-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add connections to notebook spawner page #3311
Add connections to notebook spawner page #3311
Conversation
Skipping CI for Draft Pull Request. |
250146d
to
9a17dcd
Compare
83c4a81
to
fa34d84
Compare
a3bb625
to
cc49fd6
Compare
0069d14
to
9bf71af
Compare
frontend/src/pages/projects/screens/spawner/connections/ConnectionsFormSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/projects/screens/spawner/connections/ConnectionsFormSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/projects/screens/spawner/connections/SelectConnectionsModal.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/projects/screens/spawner/connections/SelectConnectionsModal.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/projects/screens/spawner/connections/SelectConnectionsModal.tsx
Outdated
Show resolved
Hide resolved
}) => { | ||
const [connectionTypes] = useWatchConnectionTypes(); | ||
|
||
const [initialNumberConnections] = React.useState(selectedConnections.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be stored in a ref
const [initialNumberConnections] = React.useState(selectedConnections.length); | |
const initialNumberConnectionsRef = React.useRef(selectedConnections.length); |
a.metadata.annotations['opendatahub.io/connection-type'].localeCompare( | ||
b.metadata.annotations['opendatahub.io/connection-type'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Display names can differ from their k8s resource name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good catch. Although I think this is happening in the project details connection tab as well. Should i fix that in this PR or a separate one?
<FlexItem> | ||
<Button | ||
data-testid="attach-existing-connection-button" | ||
aria-describedby="no-connections-tooltip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aria-describedby="no-connections-tooltip" | |
aria-describedby={unselectedConnections.length === ? 'no-connections-tooltip' : undefined} |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, jeff-phillips-18 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Closes https://issues.redhat.com/browse/RHOAIENG-13141
https://www.figma.com/design/97akqulXiGIGtvxkdPLjMm/Data-connections-enhancement?node-id=1135-199631&node-type=canvas&t=L8KlrRwsSgc6f4pF-0
Description
Replaces data connections in the notebook spawner page.
Screenshots:
Before
Table form section
Empty state:With 2 connections:
Conflicts env vars:
notebook
UPDATED_NAME
being propagated in from the postgres connection typeModals
How Has This Been Tested?
disableConnectionTypes
dev flag tofalse
s3
connection type setup from the admin page (or wait until we have OOTB types)env
to look for the env variables from multiple connectionsA couple flows for testing (but there are a lot more):
Test Impact
Jest tests added for the connections form sub section.
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main